//
//  SingleCollectionViewCell.m
//  项目A --半糖
//
//  Created by romana on 16/5/20.
//  Copyright © 2016年 romana. All rights reserved.
//

#import "SingleCollectionViewCell.h"

@implementation SingleCollectionViewCell



-(instancetype)initWithFrame:(CGRect)frame{

    self = [super initWithFrame:frame];
    if (self) {
        [self createData];
    }
    return  self;

}


-(void)createData{
    self.contentView.backgroundColor = [UIColor clearColor];

    self.myImageView = [[UIImageView alloc] init];
    [self.contentView addSubview:self.myImageView];

    self.myLabel = [[BaseLabel alloc] init];
    self.myLabel.textAlignment = NSTextAlignmentCenter;
    self.myLabel.backgroundColor = [UIColor clearColor];
    [self.contentView addSubview:self.myLabel];



}

-(void)layoutSubviews{
    self.myImageView.frame = CGRectMake(20, 10, 60, 60);
    self.myLabel.frame = CGRectMake(0, 80, self.frame.size.width, 20);


}

-(void)setSinSModel:(SingleSecondVCModel *)SinSModel{

    _SinSModel = SinSModel;
    
    [self.myImageView sd_setImageWithURL:[NSURL URLWithString:_SinSModel.icon]];
    self.myLabel.text = _SinSModel.name;




}

@end
